package com.itheima.service.impl;

import com.itheima.common.R;
import com.itheima.dao.SysDictDataDao;
import com.itheima.pojo.SysDictData;
import com.itheima.service.SysDictDataService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (SysDictData)表服务实现类
 *
 * @author makejava
 * @since 2022-01-16 15:48:52
 */
@Service("sysDictDataService")
public class SysDictDataServiceImpl implements SysDictDataService {
    @Resource
    private SysDictDataDao sysDictDataDao;


    @Override
    public R selectByDictType(String dictType) {
        List<String> dictLabel=sysDictDataDao.selectByDictType(dictType);
        if (dictLabel == null) {
            return new R(0,"未找到数据!",null);
        }
        return new R(1,"返回对应字典列表",dictLabel);
    }
}
